package com.sen.common.widget.form;

import com.sen.common.widget.Attributes;
import com.sen.common.widget.Component;


/**
 * @author sen
 */
public class Label extends Component {

	private String labelFor;
	
	public Label() {
		this("");
	}
	
	public Label(String label) {
		super("label");
		this.add(new Content(label));
	}
	
	public Label forId(String labelFor) {
		this.labelFor = labelFor;
		return this;
	}

	@Override
	protected String specialAttributes() {
		return Attributes.attrIfNonblank("for", labelFor);
	}
}
